
import React from 'react';
import { Tabs } from 'antd';
import GuestCard from '../GuestCard';
import ManagementCard from '../ManagementCard';

const { TabPane } = Tabs;

const index: React.FC = () => {
    const [activeTab, setActiveTab] = React.useState<string>('12');

    const handleTabChange = (key: string) => {
        setActiveTab(key);
    };

    const renderContent = () => {
        switch (activeTab) {
            case '12':
                return <GuestCard />;
            case '13':
                return <ManagementCard />;
            case '14':
                return 6;
            default:
                return null;
        }
    }



    return (
        < >
            <Tabs activeKey={activeTab} onChange={handleTabChange}>
                <TabPane tab="客人卡- 开门记录" key="12" />
                <TabPane tab="管理卡- 开门记录" key="13" />
            </Tabs>

            {renderContent()}

        </>
    )
}

export default index;